<!DOCTYPE html>
<html lang="zh-CN">
<head>
	<meta charset="UTF-8">
	<title>加入直播</title>
	<meta http-equiv="content-type" content="text/html; charset=utf-8" />
	<link rel="stylesheet" href="__CSS__/base.css">
	<link rel="stylesheet" href="__CSS__/iconfont.css">
	<link rel="stylesheet" href="__CSS__/reg.css">
	<style>
		.wrap{
			box-sizing: border-box;
			height: 100vh;
			background: url("/public/static/images/bj.jpg") no-repeat;
			background-size: auto 120vh;
			position:  relative;
		}
		.headtil{
			height: 60px;
			background: #757575;
			color: #fff;
			font-size: 20px;
			line-height: 55px;
		}
		.uinfo{
			float: right;
			margin-right: 50px;
		}
		.ulogo{
			margin-left: 20px;
		}
	</style>
</head>
<body>
<div class="headtil">
	<span class="ulogo">南昌工学院 - 直播登录平台</span>
<span class="uinfo">欢迎，{$Think.cookie.name}&nbsp;&nbsp;|&nbsp;&nbsp;<a href="{:url('index/index/logout')}" style="color: #fff;text-decoration:underline">退出</a> </span>
</div>
<div class="wrap">
	<div class="wpn">
		<div class="form-data find_password">
			<h4>加入直播</h4>

				<p class="p-input pos">
					<label>直播ID</label>
					<input type="text" name="webcast_id" id="webcast_id">
				</p>
				<p class="p-input pos">
					<label>口令</label>
					<input type="text" name="stoken" id="stoken">
				</p>

			<button class="lang-btn next" id="join">加入</button>
			<p class="right">Powered by © 2018</p>
		</div>
	</div>
</div>
<form action="http://rykj.gensee.com/training/site/s/25538270" id="webcastForm" method="post">
	<input type="hidden" name="visible" value="true">
	<input type="hidden" name="gsVer" id="gsVer" value="">
	<input type="hidden" name="nickname" id="nickname" value="">
	<input type="hidden" name="token" id="token" value="">
</form>
<script src="__JS__/jquery.js"></script>
<script src="__JS__/agree.js"></script>
<script src="__JS__/layui/layui.all.js"></script>
<script type="text/javascript">

    $("#join").click(function () {
        var webcast_id = $.trim($("input[name='webcast_id']").val());
        var stoken = $.trim($("input[name='stoken']").val());
        if(webcast_id==''){layer.open({title: '提示',content: '请填写直播ID'});return}
        if(stoken==''){layer.open({title: '提示',content: '请填写口令'});return}
	
        
//        $.post("{:url('index/sync/testWebCast')}",{"webcast_id":webcast_id,"token":stoken},function (rs) {
//			console.log(rs);
//        })

        $("#nickname").val("{$Think.cookie.name}")
        $("#token").val(stoken)
        var url= "http://rykj.gensee.com/training/site/s/"+webcast_id;
        $("#webcastForm").attr("action", url);
        $("#webcastForm").submit();

    })
</script>
</body>
</html>